<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>vue</title>
  </head>
  <body>
    <div id="app">
     <ul>
        <template v-for="(product,index) in products">
            <li >{{index+1}}</li>
            <li >{{product.name}}</li>
        </template>    
     </ul>
    </div>
    <script src="vue.js"></script>
    <script>
      var vm = new Vue({
        el: "#app",
        data: {
          products: [
            { id: 1, name: "iphone11" },
            { id: 2, name: "iphone12" },
            { id: 3, name: "iphone13" },
          ],
        },
      });
    </script>
  </body>
</html>
